/* 
Obsidian个性化首页CSS样式
将此文件内容复制到Obsidian的CSS片段中
设置 → 外观 → CSS代码片段
*/

/* 进度条容器 */
.progress-container {
  margin: 10px 0;
  padding: 5px;
}

.progress-label {
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-normal);
}

/* 真实进度条样式 */
.real-progress-bar {
  width: 100%;
  height: 24px;
  background: var(--background-modifier-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.real-progress-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
}

/* 不同类型的进度条颜色 */
.progress-learning .real-progress-fill {
  background: linear-gradient(90deg, #2196F3 0%, #1976D2 100%);
}

.progress-project .real-progress-fill {
  background: linear-gradient(90deg, #FF9800 0%, #F57C00 100%);
}

.progress-task .real-progress-fill {
  background: linear-gradient(90deg, #9C27B0 0%, #7B1FA2 100%);
}

/* 进度条动画效果 */
.real-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* 进度百分比文字 */
.progress-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8em;
  font-weight: bold;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* 任务优先级标签 */
.task-priority {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7em;
  font-weight: bold;
  margin-left: 5px;
}

.priority-p0 {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #f44336;
}

.priority-p1 {
  background: #fff3e0;
  color: #ef6c00;
  border: 1px solid #ff9800;
}

.priority-p2 {
  background: #e8f5e8;
  color: #2e7d32;
  border: 1px solid #4caf50;
}

/* 四象限布局 */
.eisenhower-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 15px;
  height: 500px;
  margin: 20px 0;
  padding: 15px;
  background: var(--background-secondary);
  border-radius: 12px;
}

.quadrant {
  border: 2px solid var(--background-modifier-border);
  border-radius: 10px;
  padding: 15px;
  overflow-y: auto;
  position: relative;
}

.quadrant-header {
  font-weight: bold;
  text-align: center;
  padding: 8px;
  margin: -15px -15px 15px -15px;
  border-radius: 8px 8px 0 0;
  color: white;
}

/* 四象限颜色主题 */
.quadrant-1 {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border-color: #f44336;
}

.quadrant-1 .quadrant-header {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.quadrant-2 {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-color: #ff9800;
}

.quadrant-2 .quadrant-header {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.quadrant-3 {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  border-color: #9c27b0;
}

.quadrant-3 .quadrant-header {
  background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.quadrant-4 {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  border-color: #4caf50;
}

.quadrant-4 .quadrant-header {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

/* 日历视图样式 */
.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin: 15px 0;
  padding: 15px;
  background: var(--background-secondary);
  border-radius: 10px;
}

.calendar-header-day {
  text-align: center;
  font-weight: bold;
  padding: 8px 4px;
  font-size: 0.8em;
  color: var(--text-muted);
}

.calendar-date {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.calendar-date:hover {
  background: var(--interactive-hover);
  transform: scale(1.05);
}

.calendar-date.today {
  background: var(--interactive-accent);
  color: white;
  font-weight: bold;
}

.calendar-date.has-tasks::after {
  content: '';
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  background: var(--color-orange);
  border-radius: 50%;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.stat-card {
  background: linear-gradient(135deg, var(--background-secondary) 0%, var(--background-primary-alt) 100%);
  border: 1px solid var(--background-modifier-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--text-accent);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .eisenhower-matrix {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 200px);
    height: auto;
  }

  .mini-calendar {
    font-size: 0.8em;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* 深色主题适配 */
.theme-dark .quadrant {
  background: var(--background-primary);
}

.theme-dark .calendar-date {
  color: var(--text-normal);
}

.theme-dark .calendar-date:hover {
  background: var(--background-modifier-hover);
}

/* 自定义滚动条 */
.quadrant::-webkit-scrollbar {
  width: 6px;
}

.quadrant::-webkit-scrollbar-track {
  background: transparent;
}

.quadrant::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-bg);
  border-radius: 3px;
}

.quadrant::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-bg-hover);
}

/* 任务列表美化 */
.task-list-item {
  margin: 8px 0;
  padding: 8px 12px;
  background: var(--background-primary-alt);
  border-radius: 8px;
  border-left: 3px solid var(--color-accent);
  transition: all 0.2s ease;
}

.task-list-item:hover {
  background: var(--background-modifier-hover);
  transform: translateX(2px);
}

.task-list-item.completed {
  opacity: 0.6;
  text-decoration: line-through;
  border-left-color: var(--color-green);
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading-skeleton {
  background: linear-gradient(90deg, var(--background-modifier-border) 25%, var(--background-secondary) 50%, var(--background-modifier-border) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
  height: 20px;
  margin: 5px 0;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}